.class public Llt/noframe/gpsfarmguide/states/map_states/MeasureSelectedState;
.super Ljava/lang/Object;
.source "MeasureSelectedState.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/states/map_states/MapState;


# direct methods
.method public constructor <init>(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
    .locals 3

    .line 21
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 22
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    .line 23
    new-instance v1, Llt/noframe/gpsfarmguide/gui/GuiFactory;

    invoke-direct {v1}, Llt/noframe/gpsfarmguide/gui/GuiFactory;-><init>()V

    const/4 v2, 0x3

    invoke-virtual {v1, v2, p1}, Llt/noframe/gpsfarmguide/gui/GuiFactory;->buildGui(ILlt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 24
    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->markMeasure()V

    .line 26
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton1()Landroid/view/MenuItem;

    move-result-object p1

    const/4 v1, 0x1

    invoke-interface {p1, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 27
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton1()Landroid/view/MenuItem;

    move-result-object p1

    const v2, 0x7f0800b8

    invoke-interface {p1, v2}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 28
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton2()Landroid/view/MenuItem;

    move-result-object p1

    invoke-interface {p1, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 29
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton2()Landroid/view/MenuItem;

    move-result-object p1

    const v2, 0x7f080161

    invoke-interface {p1, v2}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 30
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton3()Landroid/view/MenuItem;

    move-result-object p1

    invoke-interface {p1, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 31
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton3()Landroid/view/MenuItem;

    move-result-object p1

    const v2, 0x7f0800aa

    invoke-interface {p1, v2}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 33
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getLayersButton()Landroid/view/MenuItem;

    move-result-object p1

    invoke-interface {p1, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 34
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object p1

    const/4 v1, 0x0

    invoke-virtual {p1, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 35
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object p1

    invoke-virtual {p1, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 36
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    check-cast p1, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p1, v1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setDrawerLocked(Z)V

    return-void
.end method


# virtual methods
.method public button1()V
    .locals 2

    .line 41
    new-instance v0, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendMapFieldEditBtnClick()V

    .line 42
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs;->chooseEditMode(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    return-void
.end method

.method public button2()V
    .locals 2

    .line 47
    new-instance v0, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendMapShareBtnClick()V

    .line 48
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/share/Share;->makeShare(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 49
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/Analytics;->sendShareUsage(Landroid/content/Context;)V

    return-void
.end method

.method public button3()V
    .locals 2

    .line 54
    new-instance v0, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendMapFieldDelete()V

    .line 55
    invoke-static {}, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs;->deleteMeasureConfirm()V

    return-void
.end method

.method public buttonCenter()V
    .locals 2

    .line 66
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x1

    invoke-static {v0, v1, v1, v1}, Llt/noframe/gpsfarmguide/LocationTracking;->centerMyPosition(Landroid/content/Context;ZZZ)Z

    return-void
.end method

.method public buttonZoom()V
    .locals 2

    .line 60
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->getPoints()Ljava/util/List;

    move-result-object v0

    const/4 v1, 0x2

    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/utils/Camera;->showMeasure(Ljava/util/List;I)V

    .line 61
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/LocationTracking;->setMapNotFollowing(Landroid/content/Context;)V

    return-void
.end method

.method public onBackPressed()V
    .locals 2

    .line 72
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->unmarkMeasure()V

    .line 73
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getGui()Llt/noframe/gpsfarmguide/gui/Gui;

    move-result-object v0

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Llt/noframe/gpsfarmguide/gui/Gui;->clearGui(I)V

    .line 74
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    new-instance v1, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;

    invoke-direct {v1}, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;-><init>()V

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->setCurrentState(Llt/noframe/gpsfarmguide/states/map_states/MapState;)V

    return-void
.end method
